package com.hdw.cms.service;

import java.io.IOException;
import java.io.InputStream;
import java.util.List;
import java.util.Map;

import com.hdw.basic.model.Pager;
import com.hdw.cms.model.Attachment;

public interface AttachmentService {
	public void add(Attachment a, InputStream is) throws IOException;

	public void delete(int id);

	public Attachment load(int id);
	
	public List<Attachment> findVideoBytype(Integer videoTypeId);
	
	 public void updatePath(Attachment t);
	 
	 public List<Attachment> listVideoAndPro();
	 
	 public List<Attachment> listAttByProType(int typeId);

	public void updatePro(String proName, String proMessage, String proPar, int id);

	public Pager<Attachment> findVideo(Integer videoTypeId);

	public Pager<Attachment> findProPic(Integer proTypeId);

	public void updatePic(Integer proTypeId, String attName, String picMessage, String proPar, int id);

	public void updateVideo(Integer proTypeId, String attName, String picMessage, int id);

	public Attachment loadVideo(int id);

	public Pager<Attachment> listSearchPro(String attName);

	public void updateIndexImg(Integer id, Integer isIndex);

	public List<Attachment> listIndexNewPicByNum();

	public Map<String, Integer> getMinAdnMaxProPos();

	public Map<String, Integer> getMinAdnMaxVdoPos();

	public void updateProPos(int id, int oldPos, int newPos);

	public void updateVdoPos(int id, int oldPos, int newPos);

}
